package net.oschina.app.service;

import net.oschina.app.bean.AttentionBean;
import net.oschina.app.bean.CallMeBean;
import net.oschina.app.bean.CollectBean;
import net.oschina.app.bean.DetailTweetBean;
import net.oschina.app.bean.ExploreEventBean;
import net.oschina.app.bean.ExploreFriendBean;
import net.oschina.app.bean.GeneralBlogBean;
import net.oschina.app.bean.GeneralBlogDetailBean;
import net.oschina.app.bean.GeneralNewsBean;
import net.oschina.app.bean.GeneralNewsDetailBean;
import net.oschina.app.bean.LoginBean;
import net.oschina.app.bean.MeBlogBean;
import net.oschina.app.bean.MessagesBean;
import net.oschina.app.bean.MoveDetailBean;
import net.oschina.app.bean.MoveNewBean;
import net.oschina.app.bean.PraiseBean;
import net.oschina.app.bean.ShakeBean;
import net.oschina.app.interf.Constants;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Query;

/**
 * Created by wei03 on 2017/1/14.
 */
public interface ApiService {
    //@GET("http://10.0.2.2:8080/oschina/list/news/page0.xml")
//    @GET(Constants.DATA_URL + "{type}/page{pageSize}.xml")
//    Call<GeneralNewsBean> getGeneralNewsBean(@Path("type") String type, @Path("pageSize") String pageSize);

    //综合-资讯,热点
    //综合-资讯,热点
    @GET(Constants.NEWS_INFOS_URL)
    Call<GeneralNewsBean> getGeneralNewsBean(@Query("pageIndex") String pageIndex, @Query("catalog") String catalog,
                                             @Query("pageSize") String pageSize, @Query("show") String show);

    //综合-资讯,热点-详情
    @GET(Constants.DETAIL_NEWS_INFOS_URL)
    Call<GeneralNewsDetailBean> generalNewsDetailBean(@Query("id") int id);

    //综合-博客,推荐
    @GET(Constants.NEWS_BLOGS_URL)
    Call<GeneralBlogBean> getGeneralBlogBean(@Query("pageIndex") String pageIndex, @Query("type") String type,
                                             @Query("pageSize") String pageSize);

    //综合-博客,推荐-详情
    @GET(Constants.DETAIL_NEWS_BLOG_URL)
    Call<GeneralBlogDetailBean> getGeneralBlogDetailBean(@Query("id") int id);

    //活动详情界面
    @GET(Constants.DETAIL_EXPLORER_RECENT_URL)
    Call<MoveDetailBean> getMoveDetailBean(@Query("id") int id);

    //收藏界面
    //http://192.168.1.100:8080/oschina/list/favorite_list1/page0.xml
    @Headers("Cookie:oscid=Y3qiOiy7zxlrt1a7F2z7iVJraDcWJjSdyDCRctYvq8ZsL7JLdsYHtBmBO3sBAMC9nD3P%2FX9C6nnfdILnN%2Fk8rrQItyt5Kf2PMZoJ0YMvYuCnA5s7ZloEf4kB7vP9r4eSO%2F%2BI9LRHRGw%3D; Domain=.oschina.net; Expires=Wed, 17-Jan-2018 01:28:07 GMT; Path=/")
    @GET(Constants.ME_COLLECT_URL)
    Call<CollectBean> getCollectBean(@Query("uid") String uid, @Query("pageIndex") String pageIndex
            , @Query("pageSize") String pageSize, @Query("type") String type);

    @GET(Constants.TWEEN_BLOGS_URL)
    Call<MoveNewBean> getMoveNewBean(@Query("uid") String uid, @Query("pageIndex") String pageIndex, @Query("pageSize") String pageSize);

    @Headers("Cookie:oscid=Y3qiOiy7zxlrt1a7F2z7iVJraDcWJjSdyDCRctYvq8ZsL7JLdsYHtBmBO3sBAMC9nD3P%2FX9C6nnfdILnN%2Fk8rrQItyt5Kf2PMZoJ0YMvYuCnA5s7ZloEf4kB7vP9r4eSO%2F%2BI9LRHRGw%3D; Domain=.oschina.net; Expires=Wed, 17-Jan-2018 01:28:07 GMT; Path=/")
    @GET(Constants.EXPLORE_FRIENDS_URL)
    Call<ExploreFriendBean> getExploreFriendBean(@Query("uid") String uid, @Query("pageIndex") String pageIndex,
                                                 @Query("catalog") String catalog, @Query("pageSize") String pageSize);

    //登陆
    @GET(Constants.LOGIN_URL)
    Call<LoginBean> getLoginBean(@Query("username") String username, @Query("pwd") String pwd,
                                 @Query("keep_login") String keep_login);

    //关注和粉丝的界面
    @Headers("Cookie:oscid=Y3qiOiy7zxlrt1a7F2z7iVJraDcWJjSdyDCRctYvq8ZsL7JLdsYHtBmBO3sBAMC9nD3P%2FX9C6nnfdILnN%2Fk8rrQItyt5Kf2PMZoJ0YMvYuCnA5s7ZloEf4kB7vP9r4eSO%2F%2BI9LRHRGw%3D; Domain=.oschina.net; Expires=Wed, 17-Jan-2018 01:28:07 GMT; Path=/")
    @GET(Constants.ME_FRIENDS_URL)
    Call<AttentionBean> getAttentionBean(@Query("uid") String uid, @Query("pageIndex") String pageIndex
            , @Query("pageSize") String pageSize, @Query("relation") String relation);


    //@我和评论界面
    @Headers("Cookie:oscid=Y3qiOiy7zxlrt1a7F2z7iVJraDcWJjSdyDCRctYvq8ZsL7JLdsYHtBmBO3sBAMC9nD3P%2FX9C6nnfdILnN%2Fk8rrQItyt5Kf2PMZoJ0YMvYuCnA5s7ZloEf4kB7vP9r4eSO%2F%2BI9LRHRGw%3D; Domain=.oschina.net; Expires=Wed, 17-Jan-2018 01:28:07 GMT; Path=/")
    @GET(Constants.EXPLORE_FRIENDS_URL)
    Call<CallMeBean> getCallmeBean(@Query("uid") String uid, @Query("pageIndex") String pageIndex,
                                   @Query("catalog") String catalog, @Query("pageSize") String pageSize);

    //我----博客界面
//    @GET(Constants.DATA_URL + "{type}/page{pageSize}.xml")
//    Call<MeBlogBean> getMeBlogBean(@Path("type") String type, @Path("pageSize") String pageSize);
    @GET(Constants.ME_BLOG_URL)
    Call<MeBlogBean> getMeBlogBean(@Query("authoruid") String authoruid, @Query("uid") String uid
            , @Query("pageIndex") String pageIndex, @Query("authorname") String authorname
            , @Query("pageSize") String pageSize);

    //消息界面的评论
    @Headers("Cookie:oscid=Y3qiOiy7zxlrt1a7F2z7iVJraDcWJjSdyDCRctYvq8ZsL7JLdsYHtBmBO3sBAMC9nD3P%2FX9C6nnfdILnN%2Fk8rrQItyt5Kf2PMZoJ0YMvYuCnA5s7ZloEf4kB7vP9r4eSO%2F%2BI9LRHRGw%3D; Domain=.oschina.net; Expires=Wed, 17-Jan-2018 01:28:07 GMT; Path=/")
    @GET(Constants.ME_NEWS_MESSAGE_URL)
    Call<MessagesBean> getMessagesBean(@Query("uid") String uid, @Query("pageIndex") String pageIndex
            , @Query("pageSize") String pageSize);

    //消息界面的赞了我
    @Headers("Cookie:oscid=Y3qiOiy7zxlrt1a7F2z7iVJraDcWJjSdyDCRctYvq8ZsL7JLdsYHtBmBO3sBAMC9nD3P%2FX9C6nnfdILnN%2Fk8rrQItyt5Kf2PMZoJ0YMvYuCnA5s7ZloEf4kB7vP9r4eSO%2F%2BI9LRHRGw%3D; Domain=.oschina.net; Expires=Wed, 17-Jan-2018 01:28:07 GMT; Path=/")
    @GET(Constants.ME_GOODS_URL)
    Call<PraiseBean> getPraiseBean();


    @GET(Constants.SHAKE_URL)
    Call<ShakeBean> getShakeBean();


    //发现界面中活动界面
    @Headers("Cookie:oscid=Y3qiOiy7zxlrt1a7F2z7iVJraDcWJjSdyDCRctYvq8ZsL7JLdsYHtBmBO3sBAMC9nD3P%2FX9C6nnfdILnN%2Fk8rrQItyt5Kf2PMZoJ0YMvYuCnA5s7ZloEf4kB7vP9r4eSO%2F%2BI9LRHRGw%3D; Domain=.oschina.net; Expires=Wed, 17-Jan-2018 01:28:07 GMT; Path=/")
    @GET(Constants.EXPLORER_RECENT_URL)
    Call<ExploreEventBean> getExploreEventBean(@Query("uid") String uid, @Query("pageIndex") String pageIndex
            , @Query("pageSize") String pageSize);

    //活动详情界面
    @GET(Constants.DETAIL_TWEET_URL)
    Call<DetailTweetBean> getDetailTweetBean(@Query("id") int id);


}
